<?php

/**
 * NarudzbinaProzvod form base class.
 *
 * @package    marketing
 * @subpackage form
 * @author     Your name here
 */
class BaseNarudzbinaProzvodForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'proizvod_id'   => new sfWidgetFormInputHidden(),
      'narudzbina_id' => new sfWidgetFormInputHidden(),
      'kolicina'      => new sfWidgetFormInput(),
      'created_at'    => new sfWidgetFormDateTime(),
      'updated_at'    => new sfWidgetFormDateTime(),
      'deleted_at'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'proizvod_id'   => new sfValidatorPropelChoice(array('model' => 'Proizvod', 'column' => 'id', 'required' => false)),
      'narudzbina_id' => new sfValidatorPropelChoice(array('model' => 'Narudzbina', 'column' => 'id', 'required' => false)),
      'kolicina'      => new sfValidatorInteger(),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
      'deleted_at'    => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('narudzbina_prozvod[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'NarudzbinaProzvod';
  }


}
